package edu.uis.csc478.spring09.threeoxen.persistence.user.impl;

import edu.uis.csc478.spring09.threeoxen.persistence.user.UserObjectFactory;
import edu.uis.csc478.spring09.threeoxen.persistence.user.UserRepository;
import edu.uis.csc478.spring09.threeoxen.persistence.user.User;

public class UserObjectFactoryImpl implements UserObjectFactory {


    @Override
    public UserRepository createUserRepository() {
        return new UserRepositoryImpl();
    }

    @Override
    public User createUser() {
        return new UserImpl();
    }

    @Override
    public User createHouseholdUser() {
        UserImpl user = new UserImpl();
        user.setType(User.TYPE_HOUSEHOLD);
        return user;
    }

    @Override
    public User createVendorUser() {
        UserImpl user = new UserImpl();
        user.setType(User.TYPE_VENDOR);
        return user;
    }

    @Override
    public User createAdminUser() {
        UserImpl user = new UserImpl();
        user.setType(User.TYPE_ADMIN);
        return user;
    }
}
